import {
    ADD_COUNTER,
    ADD_TO_CART
} from './mutation-types'
export default 
    {
    //mutations唯一的目的就是修改state里面的值
        [ADD_COUNTER](state, payload){
        payload.count++

    },
        [ADD_TO_CART](state, payload){
            payload.checked = true
        state.cartList.push(payload)
    }

}
